<%--
  Created by IntelliJ IDEA.
  User: notyoukennk
  Date: 2022/11/9
  Time: 14:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.sql.*" %>
<%@ page import="ProjectManagement.DobConn" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://"
          + request.getServerName() + ":" + request.getServerPort()
          + path + "/";
%>
<%
  try {
    Connection conn = DobConn.getConn();
    Statement stat = conn.createStatement();
    String Tid=(String) session.getAttribute("username");
    String sql1 = "SELECT Tname FROM Teacher where Tid="+Tid;
    ResultSet rs = null;
    rs = stat.executeQuery(sql1);
    while(rs.next()){
      String Tname = rs.getString("Tname");
      session.setAttribute("Tname",Tname);
    }
  } catch (Exception e) {
    e.printStackTrace();
  }
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <base href="<%=basePath%>">
  <title>教师主界面</title>
</head>

<body>
<div class="row-fluid">
  <div class="span12">
    <div class="head">
      <div class="headLeft">
        <img src="${pageContext.request.contextPath}/images/在线学习.png" width="102" height="100" />
      </div><br/>
      <div class="headRight">
        欢迎老师：
        <font color="red"><%=session.getAttribute("Tname")%></font>&nbsp;&nbsp;&nbsp;
        <i class="icon-time"></i>&nbsp;&nbsp;<font id="today"></font>
      </div>
    </div>
  </div>
</div>
<div class="row-fluid">
  <div class="span12">
    <div class="navbar">
      <div class="navbar-inner">
        <a class="brand" href="${pageContext.request.contextPath}/ProjectManagement/main.jsp"><i class="icon-home"></i>&nbsp;首页</a>
        <ul class="nav">
          <li><a href="courseshow"><i class="icon-pencil"></i>&nbsp;选课管理 </a></li>
          <li><a href="pre?method=Tcourseshow"><i class="icon-book"></i>&nbsp;成绩导入</a></li>
          <li><a href="pre?method=AllGradeQuery"><i class="icon-book"></i>&nbsp;全部学生成绩查询</a></li>
          <li><a href="pre?method=OneGradeQuery"><i class="icon-book"></i>&nbsp;单个学生成绩查询</a></li>
          <li><a href="pre?method=preupdatetepwd"><i class=" icon-cog"></i>&nbsp;修改密码</a></li>
          <li><a onclick="check()"><i class="icon-user"></i>&nbsp;退出登录</a></li>
        </ul>
      </div>
    </div>
  </div>
</div>
</body>
</html>

